package com.jblog.core.model;

public class BaseParam {

    private Long id;
    private Integer start = Integer.valueOf(0);
    private Integer end = Integer.MAX_VALUE;
    private Integer pageNo;
    private Integer pageSize;

    public BaseParam() {
    }

    public BaseParam(Integer start, Integer end) {
        if (checkBound(start)) {
            this.start = start;
        }
        if (checkBound(end)) {
            this.end = end;
        }
    }
    
    private boolean checkBound(Integer i) {
        return i >= 0 && i <= Integer.MAX_VALUE;
    }
    public Integer getStart() {
        return start;
    }

    public Integer getEnd() {
        return end;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
}
